//
// Date Picker
// --------------------------------------------------

.datepicker-trigger {
    position: relative;
    width: 100%;
    height: @input-height;
    line-height: @input-height - 2;
    border: 1px solid @border-color-base;

    &.focus {
        border-color: darken(@border-color-base, 18%);
    }
    &.required {
        border-color: @color-warning;
    }
    &.error {
        border-color: @color-danger;
    }
    &.disabled {
        background-color: #efefef;
        color: @text-color-lighter;
        cursor: @cursor-disabled;

        > .icon {
            color: @text-color-light;
            cursor: @cursor-disabled;
        }
    }
    > .datepicker-input {
        width: 100%;
        height: 100%;
        padding-right: 22px;
        border: 0;
    }
    > .icon {
        position: absolute;
        top: 10px;
        right: 5px;
        cursor: pointer;
    }
    > .placeholder {
        color: @text-color-lighter;
    }
}

.datepicker-panel {
    width: 266px;
}

.datepicker-head,
.datepicker-foot {
    position: relative;
    height: 34px;
    line-height: 34px;
}

.datepicker-head {
    text-align: center;

    a {
        position: absolute;
        display: inline-block;
        padding: 0 3px;
        line-height: 34px;
        font-size: 14px;
        cursor: pointer;
        color: @text-color-light;
        text-decoration: none;

        &:hover {
            color: #000;
        }
        &.disabled {
            color: @text-color-lighter;
            cursor: @cursor-disabled;
        }
    }
}

.datepicker-prev-year-btn {
    left: 10px;
}

.datepicker-prev-month-btn {
    left: 30px;
}

.datepicker-next-year-btn {
    right: 10px;
}

.datepicker-next-month-btn {
    right: 30px;
}

.datepicker-body {
    height: 204px;
    border-top: 1px solid @border-color-base;
    border-bottom: 1px solid @border-color-base;
}

.datepicker-table {
    margin: 5px auto;
    width: 252px;

    th, td {
        padding: 1px 0;
        text-align: center;
        font-weight: normal;
        color: @text-color-light;
    }
    th {
        height: 28px;
    }
}

.datepicker-date {
    display: inline-block;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
    border-radius: 50%;

    &:hover {
        background-color: #ddd;
    }
    &.active {
        background-color: @primary-color;
        color: #fff;
    }
    &.disabled {
        background-color: #fff;
        color: @text-color-lighter;
        cursor: @cursor-disabled;
    }
}

.datepicker-time-col {
    float: left;
    width: 88px;
    max-height: 202px;
    border-left: 1px solid @border-color-base;
    overflow: hidden;

    &:hover {
        overflow-y: auto;
    }
    &:first-child {
        border-left-width: 0;
    }
    > li {
        box-sizing: content-box;
        width: 100%;
        height: 24px;
        line-height: 24px;
        padding-left: 30px;
        text-align: left;
        cursor: pointer;
        .user-select(none);

        &:hover {
            background-color: rgb(232, 232, 232);
        }
        &.active {
            background-color: @primary-color;
            color: #fff;
        }
    }
}

.datepicker-foot {
    padding: 0 5px;
    text-align: center;

    span {
        cursor: pointer;
        color: @primary-color;

        &:hover {
            color: @primary-color-dark;
        }
    }
}

.datepicker-left-btn {
    position: absolute;
    left: 15px;
}

.datepicker-right-btn {
    position: absolute;
    right: 14px;
}